//
//  WithDrawProgressHeadCell.m
//  PPDL
//
//  Created by 王洋 on 2019/11/15.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "WithDrawProgressHeadCell.h"

@implementation WithDrawProgressHeadCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithModel:(WithDrawDetailModel *)model {
    
    if (model.relationType == PPAssetRelationType_BankWithDraw) {
        [self.withDrawBtn setImage:[UIImage imageNamed:@"quanbao_icon"] forState:UIControlStateNormal];
        [self.withDrawBtn setTitle:[NSString stringWithFormat:@"  银行卡提现"] forState:UIControlStateNormal];
        
    } else if (model.relationType == PPAssetRelationType_WeChatWithDraw) {
        [self.withDrawBtn setImage:[UIImage imageNamed:@"weixin_icon"] forState:UIControlStateNormal];
        [self.withDrawBtn setTitle:[NSString stringWithFormat:@"  微信提现"] forState:UIControlStateNormal];
        
    } else if (model.relationType == PPAssetRelationType_AliPayWithDraw) {
        [self.withDrawBtn setImage:[UIImage imageNamed:@"zhifubao_icon"] forState:UIControlStateNormal];
        [self.withDrawBtn setTitle:[NSString stringWithFormat:@"  支付宝提现"] forState:UIControlStateNormal];
        
    }
    
    self.withDrawAmount.text =[NSString stringWithFormat:@"¥%@",[Utilities changeDoubleToString:model.amount]] ;
    
    switch (model.status) {
        case PPWithdrawResultType_Wait:{

            self.withDrawProgress.text = @"待审核...";
        } break;
            
        case PPWithdrawResultType_Success:{
            self.withDrawProgress.text = @"审核通过";
            
        } break;
        case PPWithdrawResultType_Fail:{
            self.withDrawProgress.text = @"审核不通过";
            
        } break;
        default:
            break;
    }
    
}



@end
